package com.qianxun.export.constant;

/**
 * http 状态码
 * @author: huwei
 * @date:   2019/12/31 15:13
 * @version:  1.0.0
 */
public enum HttpCodeEnum {
    SUCCESS(200, "SUCCESS", "操作成功"),
    CLIENT_ERROR(400, "SERVICE_UNREACHABLE", "客户端错误"),
    AUTH_USER_NOT_LOGIN(401, "USER_NOT_LOGIN", "用户未登录"),
    AUTH_USER_PASSWORD_UNSET(402, "AUTHEN_USER_PASSWORD_UNSET", "用户登录密码尚未设置"),
    RESOURCE_NONEXISTENT(404, "RESOURCE_NONEXISTENT", "资源不存在"),
    RESOURCE_EXISTS(405, "RESOURCE_EXISTS", "资源已存在"),
    RESOURCE_ACCESS_DENIED(409, "RESOURCE_ACCESS_DENIED", "资源已存在"),
    PARAMETER_ERROR(418, "PARAMETER_ERROR", "参数错误"),
    PARAMETER_MISS(419, "PARAMETER_MISS", "参数缺失"),
    COMMENT_NONEXISTENT(425, "COMMENT_NONEXISTENT", "评论信息不存在"),
    UNKNOWN_ERROR(500, "UNKNOWN_ERROR", "未知错误"),
    PERMISSION_ACCESS_DENIED(910, "PERMISSION_ACCESS_DENIED", "无权操作"),
    ;

    private int code;
    private String enMsg;
    private String zhMsg;

    HttpCodeEnum(int code, String enMsg, String zhMsg) {
        this.code = code;
        this.enMsg = enMsg;
        this.zhMsg = zhMsg;
    }

    public int getCode() {
        return code;
    }

    public String getEnMsg() {
        return enMsg;
    }

    public String getZhMsg() {
        return zhMsg;
    }
}
